home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / gg / ncurses-5.3.lha / ncurses-5.3 / test / configure < prev    next >
Text File  |  2002-10-24  |  69KB  |  2,402 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.13.20000819 
  5. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14.  
  15. # Initialize some variables set by options.
  16. # The variables have the same names as the options, with
  17. # dashes changed to underlines.
  18. build=NONE
  19. cache_file=./config.cache
  20. exec_prefix=NONE
  21. host=NONE
  22. no_create=
  23. nonopt=NONE
  24. no_recursion=
  25. prefix=NONE
  26. program_prefix=NONE
  27. program_suffix=NONE
  28. program_transform_name=s,x,x,
  29. silent=
  30. site=
  31. srcdir=
  32. target=NONE
  33. verbose=
  34. x_includes=NONE
  35. x_libraries=NONE
  36. bindir='${exec_prefix}/bin'
  37. sbindir='${exec_prefix}/sbin'
  38. libexecdir='${exec_prefix}/libexec'
  39. datadir='${prefix}/share'
  40. sysconfdir='${prefix}/etc'
  41. sharedstatedir='${prefix}/com'
  42. localstatedir='${prefix}/var'
  43. libdir='${exec_prefix}/lib'
  44. includedir='${prefix}/include'
  45. oldincludedir='/usr/include'
  46. infodir='${prefix}/info'
  47. mandir='${prefix}/man'
  48.  
  49. # Initialize some other variables.
  50. subdirs=
  51. MFLAGS= MAKEFLAGS=
  52. SHELL=${CONFIG_SHELL-/bin/sh}
  53. # Maximum number of lines to put in a shell here document.
  54. ac_max_here_lines=12
  55.  
  56. ac_prev=
  57. for ac_option
  58. do
  59.  
  60.   # If the previous option needs an argument, assign it.
  61.   if test -n "$ac_prev"; then
  62.     eval "$ac_prev=\$ac_option"
  63.     ac_prev=
  64.     continue
  65.   fi
  66.  
  67.   case "$ac_option" in
  68.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  69.   *) ac_optarg= ;;
  70.   esac
  71.  
  72.   # Accept the important Cygnus configure options, so we can diagnose typos.
  73.  
  74.   case "$ac_option" in
  75.  
  76.   -bindir | --bindir | --bindi | --bind | --bin | --bi)
  77.     ac_prev=bindir ;;
  78.   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  79.     bindir="$ac_optarg" ;;
  80.  
  81.   -build | --build | --buil | --bui | --bu)
  82.     ac_prev=build ;;
  83.   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  84.     build="$ac_optarg" ;;
  85.  
  86.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  87.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  88.     ac_prev=cache_file ;;
  89.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  90.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  91.     cache_file="$ac_optarg" ;;
  92.  
  93.   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  94.     ac_prev=datadir ;;
  95.   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  96.   | --da=*)
  97.     datadir="$ac_optarg" ;;
  98.  
  99.   -disable-* | --disable-*)
  100.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  101.     # Reject names that are not valid shell variable names.
  102.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  103.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  104.     fi
  105.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  106.     eval "enable_${ac_feature}=no" ;;
  107.  
  108.   -enable-* | --enable-*)
  109.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  110.     # Reject names that are not valid shell variable names.
  111.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  112.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  113.     fi
  114.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  115.     case "$ac_option" in
  116.       *=*) ;;
  117.       *) ac_optarg=yes ;;
  118.     esac
  119.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  120.  
  121.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  122.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  123.   | --exec | --exe | --ex)
  124.     ac_prev=exec_prefix ;;
  125.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  126.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  127.   | --exec=* | --exe=* | --ex=*)
  128.     exec_prefix="$ac_optarg" ;;
  129.  
  130.   -gas | --gas | --ga | --g)
  131.     # Obsolete; use --with-gas.
  132.     with_gas=yes ;;
  133.  
  134.   -help | --help | --hel | --he)
  135.     # Omit some internal or obsolete options to make the list less imposing.
  136.     # This message is too long to be a string in the A/UX 3.1 sh.
  137.     cat << EOF
  138. Usage: configure [options] [host]
  139. Options: [defaults in brackets after descriptions]
  140. Configuration:
  141.   --cache-file=FILE       cache test results in FILE
  142.   --help                  print this message
  143.   --no-create             do not create output files
  144.   --quiet, --silent       do not print \`checking...' messages
  145.   --version               print the version of autoconf that created configure
  146. Directory and file names:
  147.   --prefix=PREFIX         install architecture-independent files in PREFIX
  148.                           [$ac_default_prefix]
  149.   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  150.                           [same as prefix]
  151.   --bindir=DIR            user executables in DIR [EPREFIX/bin]
  152.   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  153.   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  154.   --datadir=DIR           read-only architecture-independent data in DIR
  155.                           [PREFIX/share]
  156.   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  157.   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  158.                           [PREFIX/com]
  159.   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  160.   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  161.   --includedir=DIR        C header files in DIR [PREFIX/include]
  162.   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  163.   --infodir=DIR           info documentation in DIR [PREFIX/info]
  164.   --mandir=DIR            man documentation in DIR [PREFIX/man]
  165.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  166.   --program-prefix=PREFIX prepend PREFIX to installed program names
  167.   --program-suffix=SUFFIX append SUFFIX to installed program names
  168.   --program-transform-name=PROGRAM
  169.                           run sed PROGRAM on installed program names
  170. EOF
  171.     cat << EOF
  172. Host type:
  173.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  174.   --host=HOST             configure for HOST [guessed]
  175.   --target=TARGET         configure for TARGET [TARGET=HOST]
  176. Features and packages:
  177.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  178.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  179.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  180.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  181.   --x-includes=DIR        X include files are in DIR
  182.   --x-libraries=DIR       X library files are in DIR
  183. EOF
  184. cat <<EOF
  185. --enable and --with options recognized:
  186.   --with-5lib             use SunOS sysv-libraries
  187.   --with-ncursesw         use wide ncurses-libraries (installed)
  188.   --with-ncurses          use ncurses-libraries (installed)
  189. EOF
  190.     exit 0 ;;
  191.  
  192.   -host | --host | --hos | --ho)
  193.     ac_prev=host ;;
  194.   -host=* | --host=* | --hos=* | --ho=*)
  195.     host="$ac_optarg" ;;
  196.  
  197.   -includedir | --includedir | --includedi | --included | --include \
  198.   | --includ | --inclu | --incl | --inc)
  199.     ac_prev=includedir ;;
  200.   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  201.   | --includ=* | --inclu=* | --incl=* | --inc=*)
  202.     includedir="$ac_optarg" ;;
  203.  
  204.   -infodir | --infodir | --infodi | --infod | --info | --inf)
  205.     ac_prev=infodir ;;
  206.   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  207.     infodir="$ac_optarg" ;;
  208.  
  209.   -libdir | --libdir | --libdi | --libd)
  210.     ac_prev=libdir ;;
  211.   -libdir=* | --libdir=* | --libdi=* | --libd=*)
  212.     libdir="$ac_optarg" ;;
  213.  
  214.   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  215.   | --libexe | --libex | --libe)
  216.     ac_prev=libexecdir ;;
  217.   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  218.   | --libexe=* | --libex=* | --libe=*)
  219.     libexecdir="$ac_optarg" ;;
  220.  
  221.   -localstatedir | --localstatedir | --localstatedi | --localstated \
  222.   | --localstate | --localstat | --localsta | --localst \
  223.   | --locals | --local | --loca | --loc | --lo)
  224.     ac_prev=localstatedir ;;
  225.   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  226.   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  227.   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  228.     localstatedir="$ac_optarg" ;;
  229.  
  230.   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  231.     ac_prev=mandir ;;
  232.   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  233.     mandir="$ac_optarg" ;;
  234.  
  235.   -nfp | --nfp | --nf)
  236.     # Obsolete; use --without-fp.
  237.     with_fp=no ;;
  238.  
  239.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  240.   | --no-cr | --no-c)
  241.     no_create=yes ;;
  242.  
  243.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  244.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  245.     no_recursion=yes ;;
  246.  
  247.   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  248.   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  249.   | --oldin | --oldi | --old | --ol | --o)
  250.     ac_prev=oldincludedir ;;
  251.   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  252.   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  253.   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  254.     oldincludedir="$ac_optarg" ;;
  255.  
  256.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  257.     ac_prev=prefix ;;
  258.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  259.     prefix="$ac_optarg" ;;
  260.  
  261.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  262.   | --program-pre | --program-pr | --program-p)
  263.     ac_prev=program_prefix ;;
  264.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  265.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  266.     program_prefix="$ac_optarg" ;;
  267.  
  268.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  269.   | --program-suf | --program-su | --program-s)
  270.     ac_prev=program_suffix ;;
  271.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  272.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  273.     program_suffix="$ac_optarg" ;;
  274.  
  275.   -program-transform-name | --program-transform-name \
  276.   | --program-transform-nam | --program-transform-na \
  277.   | --program-transform-n | --program-transform- \
  278.   | --program-transform | --program-transfor \
  279.   | --program-transfo | --program-transf \
  280.   | --program-trans | --program-tran \
  281.   | --progr-tra | --program-tr | --program-t)
  282.     ac_prev=program_transform_name ;;
  283.   -program-transform-name=* | --program-transform-name=* \
  284.   | --program-transform-nam=* | --program-transform-na=* \
  285.   | --program-transform-n=* | --program-transform-=* \
  286.   | --program-transform=* | --program-transfor=* \
  287.   | --program-transfo=* | --program-transf=* \
  288.   | --program-trans=* | --program-tran=* \
  289.   | --progr-tra=* | --program-tr=* | --program-t=*)
  290.     program_transform_name="$ac_optarg" ;;
  291.  
  292.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  293.   | -silent | --silent | --silen | --sile | --sil)
  294.     silent=yes ;;
  295.  
  296.   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  297.     ac_prev=sbindir ;;
  298.   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  299.   | --sbi=* | --sb=*)
  300.     sbindir="$ac_optarg" ;;
  301.  
  302.   -sharedstatedir | --sharedstatedir | --sharedstatedi \
  303.   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  304.   | --sharedst | --shareds | --shared | --share | --shar \
  305.   | --sha | --sh)
  306.     ac_prev=sharedstatedir ;;
  307.   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  308.   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  309.   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  310.   | --sha=* | --sh=*)
  311.     sharedstatedir="$ac_optarg" ;;
  312.  
  313.   -site | --site | --sit)
  314.     ac_prev=site ;;
  315.   -site=* | --site=* | --sit=*)
  316.     site="$ac_optarg" ;;
  317.  
  318.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  319.     ac_prev=srcdir ;;
  320.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  321.     srcdir="$ac_optarg" ;;
  322.  
  323.   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  324.   | --syscon | --sysco | --sysc | --sys | --sy)
  325.     ac_prev=sysconfdir ;;
  326.   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  327.   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  328.     sysconfdir="$ac_optarg" ;;
  329.  
  330.   -target | --target | --targe | --targ | --tar | --ta | --t)
  331.     ac_prev=target ;;
  332.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  333.     target="$ac_optarg" ;;
  334.  
  335.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  336.     verbose=yes ;;
  337.  
  338.   -version | --version | --versio | --versi | --vers)
  339.     echo "configure generated by autoconf version 2.13.20000819"
  340.     exit 0 ;;
  341.  
  342.   -with-* | --with-*)
  343.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  344.     # Reject names that are not valid shell variable names.
  345.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  346.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  347.     fi
  348.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  349.     case "$ac_option" in
  350.       *=*) ;;
  351.       *) ac_optarg=yes ;;
  352.     esac
  353.     eval "with_${ac_package}='$ac_optarg'" ;;
  354.  
  355.   -without-* | --without-*)
  356.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  357.     # Reject names that are not valid shell variable names.
  358.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  359.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  360.     fi
  361.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  362.     eval "with_${ac_package}=no" ;;
  363.  
  364.   --x)
  365.     # Obsolete; use --with-x.
  366.     with_x=yes ;;
  367.  
  368.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  369.   | --x-incl | --x-inc | --x-in | --x-i)
  370.     ac_prev=x_includes ;;
  371.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  372.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  373.     x_includes="$ac_optarg" ;;
  374.  
  375.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  376.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  377.     ac_prev=x_libraries ;;
  378.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  379.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  380.     x_libraries="$ac_optarg" ;;
  381.  
  382.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  383.     ;;
  384.  
  385.   *)
  386.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  387.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  388.     fi
  389.     if test "x$nonopt" != xNONE; then
  390.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  391.     fi
  392.     nonopt="$ac_option"
  393.     ;;
  394.  
  395.   esac
  396. done
  397.  
  398. if test -n "$ac_prev"; then
  399.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  400. fi
  401.  
  402. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  403.  
  404. # File descriptor usage:
  405. # 0 standard input
  406. # 1 file creation
  407. # 2 errors and warnings
  408. # 3 some systems may open it to /dev/tty
  409. # 4 used on the Kubota Titan
  410. # 6 checking for... messages and results
  411. # 5 compiler messages saved in config.log
  412. if test "$silent" = yes; then
  413.   exec 6>/dev/null
  414. else
  415.   exec 6>&1
  416. fi
  417. exec 5>./config.log
  418.  
  419. echo "\
  420. This file contains any messages produced by compilers while
  421. running configure, to aid debugging if configure makes a mistake.
  422. " 1>&5
  423.  
  424. # Strip out --no-create and --no-recursion so they do not pile up.
  425. # Also quote any args containing shell metacharacters.
  426. ac_configure_args=
  427. for ac_arg
  428. do
  429.   case "$ac_arg" in
  430.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  431.   | --no-cr | --no-c) ;;
  432.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  433.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  434.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  435.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  436.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  437.   esac
  438. done
  439.  
  440. # NLS nuisances.
  441. # Only set these to C if already set.  These must not be set unconditionally
  442. # because not all systems understand e.g. LANG=C (notably SCO).
  443. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  444. # Non-C LC_CTYPE values break the ctype check.
  445. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  446. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  447. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  448. if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
  449.  
  450. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  451. rm -rf conftest* confdefs.h
  452. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  453. echo > confdefs.h
  454.  
  455. # A filename unique to this package, relative to the directory that
  456. # configure is in, which we can look for to find out if srcdir is correct.
  457. ac_unique_file=ncurses.c
  458.  
  459. # Find the source files, if location was not specified.
  460. if test -z "$srcdir"; then
  461.   ac_srcdir_defaulted=yes
  462.   # Try the directory containing this script, then its parent.
  463.   ac_prog=$0
  464.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  465.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  466.   srcdir=$ac_confdir
  467.   if test ! -r $srcdir/$ac_unique_file; then
  468.     srcdir=..
  469.   fi
  470. else
  471.   ac_srcdir_defaulted=no
  472. fi
  473. if test ! -r $srcdir/$ac_unique_file; then
  474.   if test "$ac_srcdir_defaulted" = yes; then
  475.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  476.   else
  477.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  478.   fi
  479. fi
  480. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  481.  
  482. # Prefer explicitly selected file to automatically selected ones.
  483. if test -z "$CONFIG_SITE"; then
  484.   if test "x$prefix" != xNONE; then
  485.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  486.   else
  487.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  488.   fi
  489. fi
  490. for ac_site_file in $CONFIG_SITE; do
  491.   if test -r "$ac_site_file"; then
  492.     echo "loading site script $ac_site_file"
  493.     . "$ac_site_file"
  494.   fi
  495. done
  496.  
  497. if test -r "$cache_file"; then
  498.   echo "loading cache $cache_file"
  499.   . $cache_file
  500. else
  501.   echo "creating cache $cache_file"
  502.   > $cache_file
  503. fi
  504.  
  505. ac_ext=c
  506. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  507. ac_cpp='$CPP $CPPFLAGS'
  508. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  509. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  510. cross_compiling=$ac_cv_prog_cc_cross
  511.  
  512. ac_exeext=
  513. ac_objext=o
  514. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  515.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  516.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  517.     ac_n= ac_c='
  518. ' ac_t='    '
  519.   else
  520.     ac_n=-n ac_c= ac_t=
  521.   fi
  522. else
  523.   ac_n= ac_c='\c' ac_t=
  524. fi
  525.  
  526.  
  527.  
  528.  
  529. # Extract the first word of "gcc", so it can be a program name with args.
  530. set dummy gcc; ac_word=$2
  531. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  532. echo "configure:533: checking for $ac_word" >&5
  533. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  534.   echo $ac_n "(cached) $ac_c" 1>&6
  535. else
  536.   if test -n "$CC"; then
  537.   ac_cv_prog_CC="$CC" # Let the user override the test.
  538. else
  539.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  540.   ac_dummy="$PATH"
  541.   for ac_dir in $ac_dummy; do
  542.     test -z "$ac_dir" && ac_dir=.
  543.     if test -f $ac_dir/$ac_word; then
  544.       ac_cv_prog_CC="gcc"
  545.       break
  546.     fi
  547.   done
  548.   IFS="$ac_save_ifs"
  549. fi
  550. fi
  551. CC="$ac_cv_prog_CC"
  552. if test -n "$CC"; then
  553.   echo "$ac_t""$CC" 1>&6
  554. else
  555.   echo "$ac_t""no" 1>&6
  556. fi
  557.  
  558. if test -z "$CC"; then
  559.   # Extract the first word of "cc", so it can be a program name with args.
  560. set dummy cc; ac_word=$2
  561. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  562. echo "configure:563: checking for $ac_word" >&5
  563. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  564.   echo $ac_n "(cached) $ac_c" 1>&6
  565. else
  566.   if test -n "$CC"; then
  567.   ac_cv_prog_CC="$CC" # Let the user override the test.
  568. else
  569.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  570.   ac_prog_rejected=no
  571.   ac_dummy="$PATH"
  572.   for ac_dir in $ac_dummy; do
  573.     test -z "$ac_dir" && ac_dir=.
  574.     if test -f $ac_dir/$ac_word; then
  575.       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  576.         ac_prog_rejected=yes
  577.     continue
  578.       fi
  579.       ac_cv_prog_CC="cc"
  580.       break
  581.     fi
  582.   done
  583.   IFS="$ac_save_ifs"
  584. if test $ac_prog_rejected = yes; then
  585.   # We found a bogon in the path, so make sure we never use it.
  586.   set dummy $ac_cv_prog_CC
  587.   shift
  588.   if test $# -gt 0; then
  589.     # We chose a different compiler from the bogus one.
  590.     # However, it has the same basename, so the bogon will be chosen
  591.     # first if we set CC to just the basename; use the full file name.
  592.     shift
  593.     set dummy "$ac_dir/$ac_word" "$@"
  594.     shift
  595.     ac_cv_prog_CC="$@"
  596.   fi
  597. fi
  598. fi
  599. fi
  600. CC="$ac_cv_prog_CC"
  601. if test -n "$CC"; then
  602.   echo "$ac_t""$CC" 1>&6
  603. else
  604.   echo "$ac_t""no" 1>&6
  605. fi
  606.  
  607.   if test -z "$CC"; then
  608.     case "`uname -s`" in
  609.     *win32* | *WIN32*)
  610.       # Extract the first word of "cl", so it can be a program name with args.
  611. set dummy cl; ac_word=$2
  612. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  613. echo "configure:614: checking for $ac_word" >&5
  614. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  615.   echo $ac_n "(cached) $ac_c" 1>&6
  616. else
  617.   if test -n "$CC"; then
  618.   ac_cv_prog_CC="$CC" # Let the user override the test.
  619. else
  620.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS=":"
  621.   ac_dummy="$PATH"
  622.   for ac_dir in $ac_dummy; do
  623.     test -z "$ac_dir" && ac_dir=.
  624.     if test -f $ac_dir/$ac_word; then
  625.       ac_cv_prog_CC="cl"
  626.       break
  627.     fi
  628.   done
  629.   IFS="$ac_save_ifs"
  630. fi
  631. fi
  632. CC="$ac_cv_prog_CC"
  633. if test -n "$CC"; then
  634.   echo "$ac_t""$CC" 1>&6
  635. else
  636.   echo "$ac_t""no" 1>&6
  637. fi
  638.  ;;
  639.     esac
  640.   fi
  641.   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  642. fi
  643.  
  644. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  645. echo "configure:646: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  646.  
  647. ac_ext=c
  648. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  649. ac_cpp='$CPP $CPPFLAGS'
  650. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  651. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  652. cross_compiling=$ac_cv_prog_cc_cross
  653.  
  654. cat > conftest.$ac_ext << EOF
  655.  
  656. #line 657 "configure"
  657. #include "confdefs.h"
  658.  
  659. main(){return(0);}
  660. EOF
  661. if { (eval echo configure:662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  662.   ac_cv_prog_cc_works=yes
  663.   # If we can't run a trivial program, we are probably using a cross compiler.
  664.   if (./conftest; exit) 2>/dev/null; then
  665.     ac_cv_prog_cc_cross=no
  666.   else
  667.     ac_cv_prog_cc_cross=yes
  668.   fi
  669. else
  670.   echo "configure: failed program was:" >&5
  671.   cat conftest.$ac_ext >&5
  672.   ac_cv_prog_cc_works=no
  673. fi
  674. rm -fr conftest*
  675. ac_ext=c
  676. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  677. ac_cpp='$CPP $CPPFLAGS'
  678. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  679. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  680. cross_compiling=$ac_cv_prog_cc_cross
  681.  
  682. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  683. if test $ac_cv_prog_cc_works = no; then
  684.   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  685. fi
  686. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  687. echo "configure:688: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  688. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  689. cross_compiling=$ac_cv_prog_cc_cross
  690.  
  691. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  692. echo "configure:693: checking whether we are using GNU C" >&5
  693. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  694.   echo $ac_n "(cached) $ac_c" 1>&6
  695. else
  696.   cat > conftest.c <<EOF
  697. #ifdef __GNUC__
  698.   yes;
  699. #endif
  700. EOF
  701. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  702.   ac_cv_prog_gcc=yes
  703. else
  704.   ac_cv_prog_gcc=no
  705. fi
  706. fi
  707.  
  708. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  709.  
  710. if test $ac_cv_prog_gcc = yes; then
  711.   GCC=yes
  712. else
  713.   GCC=
  714. fi
  715.  
  716. ac_test_CFLAGS="${CFLAGS+set}"
  717. ac_save_CFLAGS="$CFLAGS"
  718. CFLAGS=
  719. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  720. echo "configure:721: checking whether ${CC-cc} accepts -g" >&5
  721. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  722.   echo $ac_n "(cached) $ac_c" 1>&6
  723. else
  724.   echo 'void f(){}' > conftest.c
  725. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  726.   ac_cv_prog_cc_g=yes
  727. else
  728.   ac_cv_prog_cc_g=no
  729. fi
  730. rm -f conftest*
  731.  
  732. fi
  733.  
  734. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  735. if test "$ac_test_CFLAGS" = set; then
  736.   CFLAGS="$ac_save_CFLAGS"
  737. elif test $ac_cv_prog_cc_g = yes; then
  738.   if test "$GCC" = yes; then
  739.     CFLAGS="-g -O2"
  740.   else
  741.     CFLAGS="-g"
  742.   fi
  743. else
  744.   if test "$GCC" = yes; then
  745.     CFLAGS="-O2"
  746.   else
  747.     CFLAGS=
  748.   fi
  749. fi
  750.  
  751.  
  752. CC_G_OPT="-g"                
  753. CC_SHARED_OPTS=unknown            
  754. CPPFLAGS="$CPPFLAGS"            
  755. DFT_DEP_SUFFIX=""            
  756. DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`    
  757. DFT_UPR_MODEL="NORMAL"            
  758. ECHO_LINK='@ echo linking $@ ... ;'    
  759. EXTRA_LIBS=""                
  760. LD="ld"                    
  761. LDFLAGS_SHARED=""            
  762. LD_MODEL=""                
  763. LD_SHARED_OPTS=""            
  764. LIBTOOL=""                
  765. LIB_NAME=curses                
  766. LIB_PREFIX="-l"                
  767. LINK_TESTS=""                
  768. LINT=lint                
  769. LINT_OPTS=""                
  770. LOCAL_LDFLAGS=""            
  771. MATH_LIB="-lm"                
  772. PROG_EXT=""                
  773. TEST_ARGS=""                
  774. TEST_DEPS=""                
  775. cf_cv_abi_version=""            
  776. cf_cv_rel_version=""            
  777.  
  778.  
  779. # Check whether --with-5lib or --without-5lib was given.
  780. if test "${with_5lib+set}" = set; then
  781.   withval="$with_5lib"
  782.   LIBS="-L/usr/5lib $LIBS"
  783.      CPPFLAGS="$CPPFLAGS -I/usr/5include"
  784. fi
  785.  
  786.  
  787.  
  788.  
  789. # Check whether --with-ncursesw or --without-ncursesw was given.
  790. if test "${with_ncursesw+set}" = set; then
  791.   withval="$with_ncursesw"
  792.   
  793.      cat >> confdefs.h <<\EOF
  794. #define _GNU_SOURCE 1
  795. EOF
  796.  
  797.      cat >> confdefs.h <<\EOF
  798. #define _XOPEN_SOURCE_EXTENDED 1
  799. EOF
  800.  
  801.      echo $ac_n "checking for initscr""... $ac_c" 1>&6
  802. echo "configure:803: checking for initscr" >&5
  803. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  804.   echo $ac_n "(cached) $ac_c" 1>&6
  805. else
  806.   cat > conftest.$ac_ext <<EOF
  807. #line 808 "configure"
  808. #include "confdefs.h"
  809. /* System header to define __stub macros and hopefully few prototypes,
  810.     which can conflict with char initscr(); below.  */
  811. #include <assert.h>
  812. /* Override any gcc2 internal prototype to avoid an error.  */
  813. /* We use char because int might match the return type of a gcc2
  814.     builtin and then its argument prototype would still apply.  */
  815. char initscr();
  816.  
  817. int main() {
  818.  
  819. /* The GNU C library defines this for functions which it implements
  820.     to always fail with ENOSYS.  Some functions are actually named
  821.     something starting with __ and the normal name is an alias.  */
  822. #if defined (__stub_initscr) || defined (__stub___initscr)
  823. choke me
  824. #else
  825. initscr();
  826. #endif
  827.  
  828. ; return 0; }
  829. EOF
  830. if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  831.   rm -rf conftest*
  832.   eval "ac_cv_func_initscr=yes"
  833. else
  834.   echo "configure: failed program was:" >&5
  835.   cat conftest.$ac_ext >&5
  836.   rm -rf conftest*
  837.   eval "ac_cv_func_initscr=no"
  838. fi
  839. rm -f conftest*
  840. fi
  841.  
  842. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  843.   echo "$ac_t""yes" 1>&6
  844.   :
  845. else
  846.   echo "$ac_t""no" 1>&6
  847.  
  848.      echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
  849. echo "configure:850: checking for Gpm_Open in -lgpm" >&5
  850. ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
  851. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  852.   echo $ac_n "(cached) $ac_c" 1>&6
  853. else
  854.   ac_save_LIBS="$LIBS"
  855. LIBS="-lgpm  $LIBS"
  856. cat > conftest.$ac_ext <<EOF
  857. #line 858 "configure"
  858. #include "confdefs.h"
  859. /* Override any gcc2 internal prototype to avoid an error.  */
  860. /* We use char because int might match the return type of a gcc2
  861.     builtin and then its argument prototype would still apply.  */
  862. char Gpm_Open();
  863.  
  864. int main() {
  865. Gpm_Open()
  866. ; return 0; }
  867. EOF
  868. if { (eval echo configure:869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  869.   rm -rf conftest*
  870.   eval "ac_cv_lib_$ac_lib_var=yes"
  871. else
  872.   echo "configure: failed program was:" >&5
  873.   cat conftest.$ac_ext >&5
  874.   rm -rf conftest*
  875.   eval "ac_cv_lib_$ac_lib_var=no"
  876. fi
  877. rm -f conftest*
  878. LIBS="$ac_save_LIBS"
  879.  
  880. fi
  881. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  882.   echo "$ac_t""yes" 1>&6
  883.     ac_tr_lib=HAVE_LIB`echo gpm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  884.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  885.   cat >> confdefs.h <<EOF
  886. #define $ac_tr_lib 1
  887. EOF
  888.  
  889.   LIBS="-lgpm $LIBS"
  890.  
  891. else
  892.   echo "$ac_t""no" 1>&6
  893. fi
  894.  
  895.      LIB_NAME=ncursesw
  896.      echo $ac_n "checking for putwc""... $ac_c" 1>&6
  897. echo "configure:898: checking for putwc" >&5
  898. if eval "test \"`echo '$''{'ac_cv_func_putwc'+set}'`\" = set"; then
  899.   echo $ac_n "(cached) $ac_c" 1>&6
  900. else
  901.   cat > conftest.$ac_ext <<EOF
  902. #line 903 "configure"
  903. #include "confdefs.h"
  904. /* System header to define __stub macros and hopefully few prototypes,
  905.     which can conflict with char putwc(); below.  */
  906. #include <assert.h>
  907. /* Override any gcc2 internal prototype to avoid an error.  */
  908. /* We use char because int might match the return type of a gcc2
  909.     builtin and then its argument prototype would still apply.  */
  910. char putwc();
  911.  
  912. int main() {
  913.  
  914. /* The GNU C library defines this for functions which it implements
  915.     to always fail with ENOSYS.  Some functions are actually named
  916.     something starting with __ and the normal name is an alias.  */
  917. #if defined (__stub_putwc) || defined (__stub___putwc)
  918. choke me
  919. #else
  920. putwc();
  921. #endif
  922.  
  923. ; return 0; }
  924. EOF
  925. if { (eval echo configure:926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  926.   rm -rf conftest*
  927.   eval "ac_cv_func_putwc=yes"
  928. else
  929.   echo "configure: failed program was:" >&5
  930.   cat conftest.$ac_ext >&5
  931.   rm -rf conftest*
  932.   eval "ac_cv_func_putwc=no"
  933. fi
  934. rm -f conftest*
  935. fi
  936.  
  937. if eval "test \"`echo '$ac_cv_func_'putwc`\" = yes"; then
  938.   echo "$ac_t""yes" 1>&6
  939.   :
  940. else
  941.   echo "$ac_t""no" 1>&6
  942.  
  943. echo $ac_n "checking for putwc in libutf8""... $ac_c" 1>&6
  944. echo "configure:945: checking for putwc in libutf8" >&5
  945. if eval "test \"`echo '$''{'cf_cv_libutf8'+set}'`\" = set"; then
  946.   echo $ac_n "(cached) $ac_c" 1>&6
  947. else
  948.   
  949.     cf_save_LIBS="$LIBS"
  950.     LIBS="-lutf8 $LIBS"
  951. cat > conftest.$ac_ext <<EOF
  952. #line 953 "configure"
  953. #include "confdefs.h"
  954.  
  955. #include <libutf8.h>
  956. int main() {
  957. putwc(0,0);
  958. ; return 0; }
  959. EOF
  960. if { (eval echo configure:961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  961.   rm -rf conftest*
  962.   cf_cv_libutf8=yes
  963. else
  964.   echo "configure: failed program was:" >&5
  965.   cat conftest.$ac_ext >&5
  966.   rm -rf conftest*
  967.   cf_cv_libutf8=no
  968. fi
  969. rm -f conftest*
  970.     LIBS="$cf_save_LIBS"
  971.  
  972. fi
  973.  
  974. echo "$ac_t""$cf_cv_libutf8" 1>&6
  975.  
  976. if test "$cf_cv_libutf8" = yes ; then
  977.     cat >> confdefs.h <<\EOF
  978. #define HAVE_LIBUTF8_H 1
  979. EOF
  980.  
  981.     LIBS="-lutf8 $LIBS"
  982. fi
  983.  
  984. fi
  985.  
  986.      for p in $HOME /usr/local /usr
  987.      do
  988.          if test -f $p/include/ncursesw/curses.h
  989.         then
  990.             CPPFLAGS="$CPPFLAGS -I$p/include/ncursesw"
  991.             test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include"
  992.             test $p != /usr && LIBS="-L$p/lib $LIBS"
  993.             break
  994.         elif test $p != /usr
  995.         then
  996.             if test -f $p/include/curses.h
  997.             then
  998.                 CPPFLAGS="$CPPFLAGS -I$p/include"
  999.                 LIBS="-L$p/lib $LIBS"
  1000.                 break
  1001.             fi
  1002.         fi
  1003.      done
  1004.     
  1005. fi
  1006.  
  1007. fi
  1008.  
  1009.  
  1010.  
  1011. # Check whether --with-ncurses or --without-ncurses was given.
  1012. if test "${with_ncurses+set}" = set; then
  1013.   withval="$with_ncurses"
  1014.   echo $ac_n "checking for initscr""... $ac_c" 1>&6
  1015. echo "configure:1016: checking for initscr" >&5
  1016. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  1017.   echo $ac_n "(cached) $ac_c" 1>&6
  1018. else
  1019.   cat > conftest.$ac_ext <<EOF
  1020. #line 1021 "configure"
  1021. #include "confdefs.h"
  1022. /* System header to define __stub macros and hopefully few prototypes,
  1023.     which can conflict with char initscr(); below.  */
  1024. #include <assert.h>
  1025. /* Override any gcc2 internal prototype to avoid an error.  */
  1026. /* We use char because int might match the return type of a gcc2
  1027.     builtin and then its argument prototype would still apply.  */
  1028. char initscr();
  1029.  
  1030. int main() {
  1031.  
  1032. /* The GNU C library defines this for functions which it implements
  1033.     to always fail with ENOSYS.  Some functions are actually named
  1034.     something starting with __ and the normal name is an alias.  */
  1035. #if defined (__stub_initscr) || defined (__stub___initscr)
  1036. choke me
  1037. #else
  1038. initscr();
  1039. #endif
  1040.  
  1041. ; return 0; }
  1042. EOF
  1043. if { (eval echo configure:1044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1044.   rm -rf conftest*
  1045.   eval "ac_cv_func_initscr=yes"
  1046. else
  1047.   echo "configure: failed program was:" >&5
  1048.   cat conftest.$ac_ext >&5
  1049.   rm -rf conftest*
  1050.   eval "ac_cv_func_initscr=no"
  1051. fi
  1052. rm -f conftest*
  1053. fi
  1054.  
  1055. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  1056.   echo "$ac_t""yes" 1>&6
  1057.   :
  1058. else
  1059.   echo "$ac_t""no" 1>&6
  1060.  
  1061.      echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
  1062. echo "configure:1063: checking for Gpm_Open in -lgpm" >&5
  1063. ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
  1064. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1065.   echo $ac_n "(cached) $ac_c" 1>&6
  1066. else
  1067.   ac_save_LIBS="$LIBS"
  1068. LIBS="-lgpm  $LIBS"
  1069. cat > conftest.$ac_ext <<EOF
  1070. #line 1071 "configure"
  1071. #include "confdefs.h"
  1072. /* Override any gcc2 internal prototype to avoid an error.  */
  1073. /* We use char because int might match the return type of a gcc2
  1074.     builtin and then its argument prototype would still apply.  */
  1075. char Gpm_Open();
  1076.  
  1077. int main() {
  1078. Gpm_Open()
  1079. ; return 0; }
  1080. EOF
  1081. if { (eval echo configure:1082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1082.   rm -rf conftest*
  1083.   eval "ac_cv_lib_$ac_lib_var=yes"
  1084. else
  1085.   echo "configure: failed program was:" >&5
  1086.   cat conftest.$ac_ext >&5
  1087.   rm -rf conftest*
  1088.   eval "ac_cv_lib_$ac_lib_var=no"
  1089. fi
  1090. rm -f conftest*
  1091. LIBS="$ac_save_LIBS"
  1092.  
  1093. fi
  1094. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1095.   echo "$ac_t""yes" 1>&6
  1096.     ac_tr_lib=HAVE_LIB`echo gpm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1097.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1098.   cat >> confdefs.h <<EOF
  1099. #define $ac_tr_lib 1
  1100. EOF
  1101.  
  1102.   LIBS="-lgpm $LIBS"
  1103.  
  1104. else
  1105.   echo "$ac_t""no" 1>&6
  1106. fi
  1107.  
  1108.      LIB_NAME=ncurses
  1109.      for p in $HOME /usr/local /usr
  1110.      do
  1111.          if test -f $p/include/ncurses/curses.h
  1112.         then
  1113.             CPPFLAGS="$CPPFLAGS -I$p/include/ncurses"
  1114.             test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include"
  1115.             test $p != /usr && LIBS="-L$p/lib $LIBS"
  1116.             break
  1117.         elif test $p != /usr
  1118.         then
  1119.             if test -f $p/include/curses.h
  1120.             then
  1121.                 CPPFLAGS="$CPPFLAGS -I$p/include"
  1122.                 LIBS="-L$p/lib $LIBS"
  1123.                 break
  1124.             fi
  1125.         fi
  1126.      done
  1127.     
  1128. fi
  1129.  
  1130. fi
  1131.  
  1132.  
  1133.  
  1134.  
  1135. echo $ac_n "checking for initscr""... $ac_c" 1>&6
  1136. echo "configure:1137: checking for initscr" >&5
  1137. if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
  1138.   echo $ac_n "(cached) $ac_c" 1>&6
  1139. else
  1140.   cat > conftest.$ac_ext <<EOF
  1141. #line 1142 "configure"
  1142. #include "confdefs.h"
  1143. /* System header to define __stub macros and hopefully few prototypes,
  1144.     which can conflict with char initscr(); below.  */
  1145. #include <assert.h>
  1146. /* Override any gcc2 internal prototype to avoid an error.  */
  1147. /* We use char because int might match the return type of a gcc2
  1148.     builtin and then its argument prototype would still apply.  */
  1149. char initscr();
  1150.  
  1151. int main() {
  1152.  
  1153. /* The GNU C library defines this for functions which it implements
  1154.     to always fail with ENOSYS.  Some functions are actually named
  1155.     something starting with __ and the normal name is an alias.  */
  1156. #if defined (__stub_initscr) || defined (__stub___initscr)
  1157. choke me
  1158. #else
  1159. initscr();
  1160. #endif
  1161.  
  1162. ; return 0; }
  1163. EOF
  1164. if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1165.   rm -rf conftest*
  1166.   eval "ac_cv_func_initscr=yes"
  1167. else
  1168.   echo "configure: failed program was:" >&5
  1169.   cat conftest.$ac_ext >&5
  1170.   rm -rf conftest*
  1171.   eval "ac_cv_func_initscr=no"
  1172. fi
  1173. rm -f conftest*
  1174. fi
  1175.  
  1176. if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
  1177.   echo "$ac_t""yes" 1>&6
  1178.   :
  1179. else
  1180.   echo "$ac_t""no" 1>&6
  1181.  
  1182. echo $ac_n "checking for initscr in -l$LIB_NAME""... $ac_c" 1>&6
  1183. echo "configure:1184: checking for initscr in -l$LIB_NAME" >&5
  1184. ac_lib_var=`echo $LIB_NAME'_'initscr | sed 'y%./+-%__p_%'`
  1185. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1186.   echo $ac_n "(cached) $ac_c" 1>&6
  1187. else
  1188.   ac_save_LIBS="$LIBS"
  1189. LIBS="-l$LIB_NAME  $LIBS"
  1190. cat > conftest.$ac_ext <<EOF
  1191. #line 1192 "configure"
  1192. #include "confdefs.h"
  1193. /* Override any gcc2 internal prototype to avoid an error.  */
  1194. /* We use char because int might match the return type of a gcc2
  1195.     builtin and then its argument prototype would still apply.  */
  1196. char initscr();
  1197.  
  1198. int main() {
  1199. initscr()
  1200. ; return 0; }
  1201. EOF
  1202. if { (eval echo configure:1203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1203.   rm -rf conftest*
  1204.   eval "ac_cv_lib_$ac_lib_var=yes"
  1205. else
  1206.   echo "configure: failed program was:" >&5
  1207.   cat conftest.$ac_ext >&5
  1208.   rm -rf conftest*
  1209.   eval "ac_cv_lib_$ac_lib_var=no"
  1210. fi
  1211. rm -f conftest*
  1212. LIBS="$ac_save_LIBS"
  1213.  
  1214. fi
  1215. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1216.   echo "$ac_t""yes" 1>&6
  1217.     ac_tr_lib=HAVE_LIB`echo $LIB_NAME | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1218.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1219.   cat >> confdefs.h <<EOF
  1220. #define $ac_tr_lib 1
  1221. EOF
  1222.  
  1223.   LIBS="-l$LIB_NAME $LIBS"
  1224.  
  1225. else
  1226.   echo "$ac_t""no" 1>&6
  1227. fi
  1228.  
  1229. fi
  1230.  
  1231. echo $ac_n "checking for form_driver in -lform""... $ac_c" 1>&6
  1232. echo "configure:1233: checking for form_driver in -lform" >&5
  1233. ac_lib_var=`echo form'_'form_driver | sed 'y%./+-%__p_%'`
  1234. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1235.   echo $ac_n "(cached) $ac_c" 1>&6
  1236. else
  1237.   ac_save_LIBS="$LIBS"
  1238. LIBS="-lform  $LIBS"
  1239. cat > conftest.$ac_ext <<EOF
  1240. #line 1241 "configure"
  1241. #include "confdefs.h"
  1242. /* Override any gcc2 internal prototype to avoid an error.  */
  1243. /* We use char because int might match the return type of a gcc2
  1244.     builtin and then its argument prototype would still apply.  */
  1245. char form_driver();
  1246.  
  1247. int main() {
  1248. form_driver()
  1249. ; return 0; }
  1250. EOF
  1251. if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1252.   rm -rf conftest*
  1253.   eval "ac_cv_lib_$ac_lib_var=yes"
  1254. else
  1255.   echo "configure: failed program was:" >&5
  1256.   cat conftest.$ac_ext >&5
  1257.   rm -rf conftest*
  1258.   eval "ac_cv_lib_$ac_lib_var=no"
  1259. fi
  1260. rm -f conftest*
  1261. LIBS="$ac_save_LIBS"
  1262.  
  1263. fi
  1264. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1265.   echo "$ac_t""yes" 1>&6
  1266.     ac_tr_lib=HAVE_LIB`echo form | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1267.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1268.   cat >> confdefs.h <<EOF
  1269. #define $ac_tr_lib 1
  1270. EOF
  1271.  
  1272.   LIBS="-lform $LIBS"
  1273.  
  1274. else
  1275.   echo "$ac_t""no" 1>&6
  1276. fi
  1277.  
  1278. echo $ac_n "checking for menu_driver in -lmenu""... $ac_c" 1>&6
  1279. echo "configure:1280: checking for menu_driver in -lmenu" >&5
  1280. ac_lib_var=`echo menu'_'menu_driver | sed 'y%./+-%__p_%'`
  1281. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1282.   echo $ac_n "(cached) $ac_c" 1>&6
  1283. else
  1284.   ac_save_LIBS="$LIBS"
  1285. LIBS="-lmenu  $LIBS"
  1286. cat > conftest.$ac_ext <<EOF
  1287. #line 1288 "configure"
  1288. #include "confdefs.h"
  1289. /* Override any gcc2 internal prototype to avoid an error.  */
  1290. /* We use char because int might match the return type of a gcc2
  1291.     builtin and then its argument prototype would still apply.  */
  1292. char menu_driver();
  1293.  
  1294. int main() {
  1295. menu_driver()
  1296. ; return 0; }
  1297. EOF
  1298. if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1299.   rm -rf conftest*
  1300.   eval "ac_cv_lib_$ac_lib_var=yes"
  1301. else
  1302.   echo "configure: failed program was:" >&5
  1303.   cat conftest.$ac_ext >&5
  1304.   rm -rf conftest*
  1305.   eval "ac_cv_lib_$ac_lib_var=no"
  1306. fi
  1307. rm -f conftest*
  1308. LIBS="$ac_save_LIBS"
  1309.  
  1310. fi
  1311. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1312.   echo "$ac_t""yes" 1>&6
  1313.     ac_tr_lib=HAVE_LIB`echo menu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1314.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1315.   cat >> confdefs.h <<EOF
  1316. #define $ac_tr_lib 1
  1317. EOF
  1318.  
  1319.   LIBS="-lmenu $LIBS"
  1320.  
  1321. else
  1322.   echo "$ac_t""no" 1>&6
  1323. fi
  1324.  
  1325. echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6
  1326. echo "configure:1327: checking for new_panel in -lpanel" >&5
  1327. ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'`
  1328. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1329.   echo $ac_n "(cached) $ac_c" 1>&6
  1330. else
  1331.   ac_save_LIBS="$LIBS"
  1332. LIBS="-lpanel  $LIBS"
  1333. cat > conftest.$ac_ext <<EOF
  1334. #line 1335 "configure"
  1335. #include "confdefs.h"
  1336. /* Override any gcc2 internal prototype to avoid an error.  */
  1337. /* We use char because int might match the return type of a gcc2
  1338.     builtin and then its argument prototype would still apply.  */
  1339. char new_panel();
  1340.  
  1341. int main() {
  1342. new_panel()
  1343. ; return 0; }
  1344. EOF
  1345. if { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1346.   rm -rf conftest*
  1347.   eval "ac_cv_lib_$ac_lib_var=yes"
  1348. else
  1349.   echo "configure: failed program was:" >&5
  1350.   cat conftest.$ac_ext >&5
  1351.   rm -rf conftest*
  1352.   eval "ac_cv_lib_$ac_lib_var=no"
  1353. fi
  1354. rm -f conftest*
  1355. LIBS="$ac_save_LIBS"
  1356.  
  1357. fi
  1358. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1359.   echo "$ac_t""yes" 1>&6
  1360.     ac_tr_lib=HAVE_LIB`echo panel | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1361.     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1362.   cat >> confdefs.h <<EOF
  1363. #define $ac_tr_lib 1
  1364. EOF
  1365.  
  1366.   LIBS="-lpanel $LIBS"
  1367.  
  1368. else
  1369.   echo "$ac_t""no" 1>&6
  1370. fi
  1371.  
  1372.  
  1373. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1374. echo "configure:1375: checking return type of signal handlers" >&5
  1375. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1376.   echo $ac_n "(cached) $ac_c" 1>&6
  1377. else
  1378.   cat > conftest.$ac_ext <<EOF
  1379. #line 1380 "configure"
  1380. #include "confdefs.h"
  1381. #include <sys/types.h>
  1382. #include <signal.h>
  1383. #ifdef signal
  1384. #undef signal
  1385. #endif
  1386. #ifdef __cplusplus
  1387. extern "C" void (*signal (int, void (*)(int)))(int);
  1388. #else
  1389. void (*signal ()) ();
  1390. #endif
  1391.  
  1392. int main() {
  1393. int i;
  1394. ; return 0; }
  1395. EOF
  1396. if { (eval echo configure:1397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1397.   rm -rf conftest*
  1398.   ac_cv_type_signal=void
  1399. else
  1400.   echo "configure: failed program was:" >&5
  1401.   cat conftest.$ac_ext >&5
  1402.   rm -rf conftest*
  1403.   ac_cv_type_signal=int
  1404. fi
  1405. rm -f conftest*
  1406. fi
  1407.  
  1408. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1409. cat >> confdefs.h <<EOF
  1410. #define RETSIGTYPE $ac_cv_type_signal
  1411. EOF
  1412.  
  1413.  
  1414.  
  1415. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1416. echo "configure:1417: checking how to run the C preprocessor" >&5
  1417. # On Suns, sometimes $CPP names a directory.
  1418. if test -n "$CPP" && test -d "$CPP"; then
  1419.   CPP=
  1420. fi
  1421. if test -z "$CPP"; then
  1422. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1423.   echo $ac_n "(cached) $ac_c" 1>&6
  1424. else
  1425.     # This must be in double quotes, not single quotes, because CPP may get
  1426.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1427.   CPP="${CC-cc} -E"
  1428.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1429.   # not just through cpp.
  1430.   cat > conftest.$ac_ext <<EOF
  1431. #line 1432 "configure"
  1432. #include "confdefs.h"
  1433. #include <assert.h>
  1434. Syntax Error
  1435. EOF
  1436. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1437. { (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1438. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1439. if test -z "$ac_err"; then
  1440.   :
  1441. else
  1442.   echo "$ac_err" >&5
  1443.   echo "configure: failed program was:" >&5
  1444.   cat conftest.$ac_ext >&5
  1445.   rm -rf conftest*
  1446.   CPP="${CC-cc} -E -traditional-cpp"
  1447.   cat > conftest.$ac_ext <<EOF
  1448. #line 1449 "configure"
  1449. #include "confdefs.h"
  1450. #include <assert.h>
  1451. Syntax Error
  1452. EOF
  1453. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1454. { (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1455. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1456. if test -z "$ac_err"; then
  1457.   :
  1458. else
  1459.   echo "$ac_err" >&5
  1460.   echo "configure: failed program was:" >&5
  1461.   cat conftest.$ac_ext >&5
  1462.   rm -rf conftest*
  1463.   CPP="${CC-cc} -nologo -E"
  1464.   cat > conftest.$ac_ext <<EOF
  1465. #line 1466 "configure"
  1466. #include "confdefs.h"
  1467. #include <assert.h>
  1468. Syntax Error
  1469. EOF
  1470. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1471. { (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1472. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1473. if test -z "$ac_err"; then
  1474.   :
  1475. else
  1476.   echo "$ac_err" >&5
  1477.   echo "configure: failed program was:" >&5
  1478.   cat conftest.$ac_ext >&5
  1479.   rm -rf conftest*
  1480.   CPP=/lib/cpp
  1481. fi
  1482. rm -f conftest*
  1483. fi
  1484. rm -f conftest*
  1485. fi
  1486. rm -f conftest*
  1487.   ac_cv_prog_CPP="$CPP"
  1488. fi
  1489.   CPP="$ac_cv_prog_CPP"
  1490. else
  1491.   ac_cv_prog_CPP="$CPP"
  1492. fi
  1493. echo "$ac_t""$CPP" 1>&6
  1494.  
  1495. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  1496. echo "configure:1497: checking for ANSI C header files" >&5
  1497. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  1498.   echo $ac_n "(cached) $ac_c" 1>&6
  1499. else
  1500.   cat > conftest.$ac_ext <<EOF
  1501. #line 1502 "configure"
  1502. #include "confdefs.h"
  1503. #include <stdlib.h>
  1504. #include <stdarg.h>
  1505. #include <string.h>
  1506. #include <float.h>
  1507. EOF
  1508. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1509. { (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1510. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1511. if test -z "$ac_err"; then
  1512.   rm -rf conftest*
  1513.   ac_cv_header_stdc=yes
  1514. else
  1515.   echo "$ac_err" >&5
  1516.   echo "configure: failed program was:" >&5
  1517.   cat conftest.$ac_ext >&5
  1518.   rm -rf conftest*
  1519.   ac_cv_header_stdc=no
  1520. fi
  1521. rm -f conftest*
  1522.  
  1523. if test $ac_cv_header_stdc = yes; then
  1524.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  1525. cat > conftest.$ac_ext <<EOF
  1526. #line 1527 "configure"
  1527. #include "confdefs.h"
  1528. #include <string.h>
  1529. EOF
  1530. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1531.   egrep "memchr" >/dev/null 2>&1; then
  1532.   :
  1533. else
  1534.   rm -rf conftest*
  1535.   ac_cv_header_stdc=no
  1536. fi
  1537. rm -f conftest*
  1538.  
  1539. fi
  1540.  
  1541. if test $ac_cv_header_stdc = yes; then
  1542.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  1543. cat > conftest.$ac_ext <<EOF
  1544. #line 1545 "configure"
  1545. #include "confdefs.h"
  1546. #include <stdlib.h>
  1547. EOF
  1548. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1549.   egrep "free" >/dev/null 2>&1; then
  1550.   :
  1551. else
  1552.   rm -rf conftest*
  1553.   ac_cv_header_stdc=no
  1554. fi
  1555. rm -f conftest*
  1556.  
  1557. fi
  1558.  
  1559. if test $ac_cv_header_stdc = yes; then
  1560.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  1561. if test "$cross_compiling" = yes; then
  1562.   :
  1563. else
  1564.   cat > conftest.$ac_ext <<EOF
  1565. #line 1566 "configure"
  1566. #include "confdefs.h"
  1567. #include <ctype.h>
  1568. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  1569. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  1570. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  1571. int main () { int i; for (i = 0; i < 256; i++)
  1572. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  1573. exit (0); }
  1574.  
  1575. EOF
  1576. if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1577. then
  1578.   :
  1579. else
  1580.   echo "configure: failed program was:" >&5
  1581.   cat conftest.$ac_ext >&5
  1582.   rm -fr conftest*
  1583.   ac_cv_header_stdc=no
  1584. fi
  1585. rm -fr conftest*
  1586. fi
  1587.  
  1588. fi
  1589. fi
  1590.  
  1591. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  1592. if test $ac_cv_header_stdc = yes; then
  1593.   cat >> confdefs.h <<\EOF
  1594. #define STDC_HEADERS 1
  1595. EOF
  1596.  
  1597. fi
  1598.  
  1599. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  1600. echo "configure:1601: checking whether time.h and sys/time.h may both be included" >&5
  1601. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  1602.   echo $ac_n "(cached) $ac_c" 1>&6
  1603. else
  1604.   cat > conftest.$ac_ext <<EOF
  1605. #line 1606 "configure"
  1606. #include "confdefs.h"
  1607. #include <sys/types.h>
  1608. #include <sys/time.h>
  1609. #include <time.h>
  1610. int main() {
  1611. struct tm *tp;
  1612. ; return 0; }
  1613. EOF
  1614. if { (eval echo configure:1615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1615.   rm -rf conftest*
  1616.   ac_cv_header_time=yes
  1617. else
  1618.   echo "configure: failed program was:" >&5
  1619.   cat conftest.$ac_ext >&5
  1620.   rm -rf conftest*
  1621.   ac_cv_header_time=no
  1622. fi
  1623. rm -f conftest*
  1624. fi
  1625.  
  1626. echo "$ac_t""$ac_cv_header_time" 1>&6
  1627. if test $ac_cv_header_time = yes; then
  1628.   cat >> confdefs.h <<\EOF
  1629. #define TIME_WITH_SYS_TIME 1
  1630. EOF
  1631.  
  1632. fi
  1633.  
  1634. for ac_hdr in \
  1635. form.h \
  1636. getopt.h \
  1637. locale.h \
  1638. menu.h \
  1639. nc_alloc.h \
  1640. nomacros.h \
  1641. panel.h \
  1642. sys/ioctl.h \
  1643. sys/select.h \
  1644. sys/time.h \
  1645. termios.h \
  1646. unistd.h \
  1647.  
  1648. do
  1649. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1650. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1651. echo "configure:1652: checking for $ac_hdr" >&5
  1652. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1653.   echo $ac_n "(cached) $ac_c" 1>&6
  1654. else
  1655.   cat > conftest.$ac_ext <<EOF
  1656. #line 1657 "configure"
  1657. #include "confdefs.h"
  1658. #include <$ac_hdr>
  1659. EOF
  1660. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1661. { (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1662. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1663. if test -z "$ac_err"; then
  1664.   rm -rf conftest*
  1665.   eval "ac_cv_header_$ac_safe=yes"
  1666. else
  1667.   echo "$ac_err" >&5
  1668.   echo "configure: failed program was:" >&5
  1669.   cat conftest.$ac_ext >&5
  1670.   rm -rf conftest*
  1671.   eval "ac_cv_header_$ac_safe=no"
  1672. fi
  1673. rm -f conftest*
  1674. fi
  1675. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1676.   echo "$ac_t""yes" 1>&6
  1677.     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1678.   cat >> confdefs.h <<EOF
  1679. #define $ac_tr_hdr 1
  1680. EOF
  1681.  
  1682. else
  1683.   echo "$ac_t""no" 1>&6
  1684. fi
  1685. done
  1686.  
  1687.  
  1688. for ac_func in \
  1689. getnstr \
  1690. gettimeofday \
  1691. napms \
  1692. resize_term \
  1693. resizeterm \
  1694. strdup \
  1695. use_default_colors \
  1696. vsscanf \
  1697. wresize \
  1698.  
  1699. do
  1700. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1701. echo "configure:1702: checking for $ac_func" >&5
  1702. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1703.   echo $ac_n "(cached) $ac_c" 1>&6
  1704. else
  1705.   cat > conftest.$ac_ext <<EOF
  1706. #line 1707 "configure"
  1707. #include "confdefs.h"
  1708. /* System header to define __stub macros and hopefully few prototypes,
  1709.     which can conflict with char $ac_func(); below.  */
  1710. #include <assert.h>
  1711. /* Override any gcc2 internal prototype to avoid an error.  */
  1712. /* We use char because int might match the return type of a gcc2
  1713.     builtin and then its argument prototype would still apply.  */
  1714. char $ac_func();
  1715.  
  1716. int main() {
  1717.  
  1718. /* The GNU C library defines this for functions which it implements
  1719.     to always fail with ENOSYS.  Some functions are actually named
  1720.     something starting with __ and the normal name is an alias.  */
  1721. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1722. choke me
  1723. #else
  1724. $ac_func();
  1725. #endif
  1726.  
  1727. ; return 0; }
  1728. EOF
  1729. if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1730.   rm -rf conftest*
  1731.   eval "ac_cv_func_$ac_func=yes"
  1732. else
  1733.   echo "configure: failed program was:" >&5
  1734.   cat conftest.$ac_ext >&5
  1735.   rm -rf conftest*
  1736.   eval "ac_cv_func_$ac_func=no"
  1737. fi
  1738. rm -f conftest*
  1739. fi
  1740.  
  1741. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1742.   echo "$ac_t""yes" 1>&6
  1743.     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1744.   cat >> confdefs.h <<EOF
  1745. #define $ac_tr_func 1
  1746. EOF
  1747.  
  1748. else
  1749.   echo "$ac_t""no" 1>&6
  1750. fi
  1751. done
  1752.  
  1753.  
  1754. echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
  1755. echo "configure:1756: checking for function curses_version" >&5
  1756. if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
  1757.   echo $ac_n "(cached) $ac_c" 1>&6
  1758. else
  1759.   
  1760. if test "$cross_compiling" = yes; then
  1761.   cf_cv_func_curses_version=unknown
  1762. else
  1763.   cat > conftest.$ac_ext <<EOF
  1764. #line 1765 "configure"
  1765. #include "confdefs.h"
  1766.  
  1767. #include <curses.h>
  1768. int main()
  1769. {
  1770.     char temp[1024];
  1771.     sprintf(temp, "%s\n", curses_version());
  1772.     exit(0);
  1773. }
  1774.  
  1775. EOF
  1776. if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1777. then
  1778.   cf_cv_func_curses_version=yes
  1779.  
  1780. else
  1781.   echo "configure: failed program was:" >&5
  1782.   cat conftest.$ac_ext >&5
  1783.   rm -fr conftest*
  1784.   cf_cv_func_curses_version=no
  1785.  
  1786. fi
  1787. rm -fr conftest*
  1788. fi
  1789.  
  1790. rm -f core
  1791. fi
  1792.  
  1793. echo "$ac_t""$cf_cv_func_curses_version" 1>&6
  1794. test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
  1795. #define HAVE_CURSES_VERSION 1
  1796. EOF
  1797.  
  1798.  
  1799. echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
  1800. echo "configure:1801: checking for alternate character set array" >&5
  1801. if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
  1802.   echo $ac_n "(cached) $ac_c" 1>&6
  1803. else
  1804.   
  1805. cf_cv_curses_acs_map=unknown
  1806. for name in acs_map _acs_map __acs_map _nc_acs_map
  1807. do
  1808. cat > conftest.$ac_ext <<EOF
  1809. #line 1810 "configure"
  1810. #include "confdefs.h"
  1811.  
  1812. #include <curses.h>
  1813.  
  1814. int main() {
  1815.  
  1816. $name['k'] = ACS_PLUS
  1817.  
  1818. ; return 0; }
  1819. EOF
  1820. if { (eval echo configure:1821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1821.   rm -rf conftest*
  1822.   cf_cv_curses_acs_map=$name; break
  1823. else
  1824.   echo "configure: failed program was:" >&5
  1825.   cat conftest.$ac_ext >&5
  1826. fi
  1827. rm -f conftest*
  1828. done
  1829.  
  1830. fi
  1831.  
  1832. echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
  1833.  
  1834. test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
  1835. #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
  1836. EOF
  1837.  
  1838.  
  1839. echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
  1840. echo "configure:1841: checking for wide alternate character set array" >&5
  1841. if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
  1842.   echo $ac_n "(cached) $ac_c" 1>&6
  1843. else
  1844.   
  1845. cf_cv_curses_wacs_map=unknown
  1846. for name in wacs_map _wacs_map __wacs_map _nc_wacs
  1847. do
  1848. cat > conftest.$ac_ext <<EOF
  1849. #line 1850 "configure"
  1850. #include "confdefs.h"
  1851.  
  1852. #ifndef _XOPEN_SOURCE_EXTENDED
  1853. #define _XOPEN_SOURCE_EXTENDED
  1854. #endif
  1855. #include <curses.h>
  1856.  
  1857. int main() {
  1858.  
  1859. $name['k'] = *WACS_PLUS    
  1860.  
  1861. ; return 0; }
  1862. EOF
  1863. if { (eval echo configure:1864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1864.   rm -rf conftest*
  1865.   cf_cv_curses_wacs_map=$name; break
  1866. else
  1867.   echo "configure: failed program was:" >&5
  1868.   cat conftest.$ac_ext >&5
  1869. fi
  1870. rm -f conftest*
  1871. done
  1872.  
  1873. fi
  1874.  
  1875. echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
  1876.  
  1877. test "$cf_cv_curses_wacs_map" != unknown && cat >> confdefs.h <<EOF
  1878. #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
  1879. EOF
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885. echo $ac_n "checking for type attr_t in curses.h""... $ac_c" 1>&6
  1886. echo "configure:1887: checking for type attr_t in curses.h" >&5
  1887. cat > conftest.$ac_ext <<EOF
  1888. #line 1889 "configure"
  1889. #include "confdefs.h"
  1890.  
  1891. #ifndef _XOPEN_SOURCE_EXTENDED
  1892. #define _XOPEN_SOURCE_EXTENDED
  1893. #endif
  1894. #include <curses.h>
  1895. int main() {
  1896.  
  1897. attr_t foo
  1898.  
  1899. ; return 0; }
  1900. EOF
  1901. if { (eval echo configure:1902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1902.   rm -rf conftest*
  1903.   cf_result=yes
  1904. else
  1905.   echo "configure: failed program was:" >&5
  1906.   cat conftest.$ac_ext >&5
  1907.   rm -rf conftest*
  1908.   cf_result=no
  1909. fi
  1910. rm -f conftest*
  1911. echo "$ac_t""$cf_result" 1>&6
  1912. if test $cf_result = yes ; then
  1913.      
  1914. cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  1915.  
  1916.     cat >> confdefs.h <<EOF
  1917. #define $cf_result 1
  1918. EOF
  1919.  
  1920. else
  1921.     cat >> confdefs.h <<EOF
  1922. #define attr_t long
  1923. EOF
  1924.  
  1925. fi
  1926.  
  1927.  
  1928. echo $ac_n "checking for type mbstate_t in curses.h""... $ac_c" 1>&6
  1929. echo "configure:1930: checking for type mbstate_t in curses.h" >&5
  1930. cat > conftest.$ac_ext <<EOF
  1931. #line 1932 "configure"
  1932. #include "confdefs.h"
  1933.  
  1934. #ifndef _XOPEN_SOURCE_EXTENDED
  1935. #define _XOPEN_SOURCE_EXTENDED
  1936. #endif
  1937. #include <curses.h>
  1938. int main() {
  1939.  
  1940. mbstate_t foo
  1941.  
  1942. ; return 0; }
  1943. EOF
  1944. if { (eval echo configure:1945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1945.   rm -rf conftest*
  1946.   cf_result=yes
  1947. else
  1948.   echo "configure: failed program was:" >&5
  1949.   cat conftest.$ac_ext >&5
  1950.   rm -rf conftest*
  1951.   cf_result=no
  1952. fi
  1953. rm -f conftest*
  1954. echo "$ac_t""$cf_result" 1>&6
  1955. if test $cf_result = yes ; then
  1956.      
  1957. cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
  1958.  
  1959.     cat >> confdefs.h <<EOF
  1960. #define $cf_result 1
  1961. EOF
  1962.  
  1963. else
  1964.     cat >> confdefs.h <<EOF
  1965. #define mbstate_t long
  1966. EOF
  1967.  
  1968. fi
  1969.  
  1970.  
  1971.  
  1972. echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
  1973. echo "configure:1974: checking if sys/time.h works with sys/select.h" >&5
  1974. if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
  1975.   echo $ac_n "(cached) $ac_c" 1>&6
  1976. else
  1977.   
  1978. cat > conftest.$ac_ext <<EOF
  1979. #line 1980 "configure"
  1980. #include "confdefs.h"
  1981.  
  1982. #include <sys/types.h>
  1983. #ifdef HAVE_SYS_TIME_H
  1984. #include <sys/time.h>
  1985. #endif
  1986. #ifdef HAVE_SYS_SELECT_H
  1987. #include <sys/select.h>
  1988. #endif
  1989.  
  1990. int main() {
  1991.  
  1992. ; return 0; }
  1993. EOF
  1994. if { (eval echo configure:1995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1995.   rm -rf conftest*
  1996.   cf_cv_sys_time_select=yes
  1997. else
  1998.   echo "configure: failed program was:" >&5
  1999.   cat conftest.$ac_ext >&5
  2000.   rm -rf conftest*
  2001.   cf_cv_sys_time_select=no
  2002. fi
  2003. rm -f conftest*
  2004.      
  2005. fi
  2006.  
  2007. echo "$ac_t""$cf_cv_sys_time_select" 1>&6
  2008. test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
  2009. #define HAVE_SYS_TIME_SELECT 1
  2010. EOF
  2011.  
  2012.  
  2013.  
  2014. trap '' 1 2 15
  2015. cat > confcache <<\EOF
  2016. # This file is a shell script that caches the results of configure
  2017. # tests run on this system so they can be shared between configure
  2018. # scripts and configure runs.  It is not useful on other systems.
  2019. # If it contains results you don't want to keep, you may remove or edit it.
  2020. #
  2021. # By default, configure uses ./config.cache as the cache file,
  2022. # creating it if it does not exist already.  You can give configure
  2023. # the --cache-file=FILE option to use a different cache file; that is
  2024. # what configure does when it calls configure scripts in
  2025. # subdirectories, so they share the cache.
  2026. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  2027. # config.status only pays attention to the cache file if you give it the
  2028. # --recheck option to rerun configure.
  2029. #
  2030. EOF
  2031. # The following way of writing the cache mishandles newlines in values,
  2032. # but we know of no workaround that is simple, portable, and efficient.
  2033. # So, don't put newlines in cache variables' values.
  2034. # Ultrix sh set writes to stderr and can't be redirected directly,
  2035. # and sets the high bit in the cache file unless we assign to the vars.
  2036. (set) 2>&1 |
  2037.   case `(ac_space=' '; set | grep ac_space) 2>&1` in
  2038.   *ac_space=\ *)
  2039.     # `set' does not quote correctly, so add quotes (double-quote substitution
  2040.     # turns \\\\ into \\, and sed turns \\ into \).
  2041.     sed -n \
  2042.       -e "s/'/'\\\\''/g" \
  2043.       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  2044.     ;;
  2045.   *)
  2046.     # `set' quotes correctly as required by POSIX, so do not add quotes.
  2047.     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  2048.     ;;
  2049.   esac >> confcache
  2050. if cmp -s $cache_file confcache; then
  2051.   :
  2052. else
  2053.   if test -w $cache_file; then
  2054.     echo "updating cache $cache_file"
  2055.     cat confcache > $cache_file
  2056.   else
  2057.     echo "not updating unwritable cache $cache_file"
  2058.   fi
  2059. fi
  2060. rm -f confcache
  2061.  
  2062. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  2063.  
  2064. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  2065. # Let make expand exec_prefix.
  2066. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  2067.  
  2068. # Any assignment to VPATH causes Sun make to only execute
  2069. # the first set of double-colon rules, so remove it if not needed.
  2070. # If there is a colon in the path, we need to keep it.
  2071. if test "x$srcdir" = x.; then
  2072.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  2073. fi
  2074.  
  2075. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  2076.  
  2077. DEFS=-DHAVE_CONFIG_H
  2078.  
  2079. # Without the "./", some shells look in PATH for config.status.
  2080. : ${CONFIG_STATUS=./config.status}
  2081.  
  2082. echo creating $CONFIG_STATUS
  2083. rm -f $CONFIG_STATUS
  2084. cat > $CONFIG_STATUS <<EOF
  2085. #! /bin/sh
  2086. # Generated automatically by configure.
  2087. # Run this file to recreate the current configuration.
  2088. # This directory was configured as follows,
  2089. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  2090. #
  2091. # $0 $ac_configure_args
  2092. #
  2093. # Compiler output produced by configure, useful for debugging
  2094. # configure, is in ./config.log if it exists.
  2095.  
  2096. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  2097. for ac_option
  2098. do
  2099.   case "\$ac_option" in
  2100.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  2101.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  2102.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  2103.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  2104.     echo "$CONFIG_STATUS generated by autoconf version 2.13.20000819"
  2105.     exit 0 ;;
  2106.   -help | --help | --hel | --he | --h)
  2107.     echo "\$ac_cs_usage"; exit 0 ;;
  2108.   *) echo "\$ac_cs_usage"; exit 1 ;;
  2109.   esac
  2110. done
  2111.  
  2112. ac_given_srcdir=$srcdir
  2113.  
  2114. trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  2115. EOF
  2116. cat >> $CONFIG_STATUS <<EOF
  2117.  
  2118. # Protect against being on the right side of a sed subst in config.status.
  2119. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  2120.  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  2121. $ac_vpsub
  2122. $extrasub
  2123. s%@SHELL@%$SHELL%g
  2124. s%@CFLAGS@%$CFLAGS%g
  2125. s%@CPPFLAGS@%$CPPFLAGS%g
  2126. s%@CXXFLAGS@%$CXXFLAGS%g
  2127. s%@FFLAGS@%$FFLAGS%g
  2128. s%@DEFS@%$DEFS%g
  2129. s%@LDFLAGS@%$LDFLAGS%g
  2130. s%@LIBS@%$LIBS%g
  2131. s%@exec_prefix@%$exec_prefix%g
  2132. s%@prefix@%$prefix%g
  2133. s%@program_transform_name@%$program_transform_name%g
  2134. s%@bindir@%$bindir%g
  2135. s%@sbindir@%$sbindir%g
  2136. s%@libexecdir@%$libexecdir%g
  2137. s%@datadir@%$datadir%g
  2138. s%@sysconfdir@%$sysconfdir%g
  2139. s%@sharedstatedir@%$sharedstatedir%g
  2140. s%@localstatedir@%$localstatedir%g
  2141. s%@libdir@%$libdir%g
  2142. s%@includedir@%$includedir%g
  2143. s%@oldincludedir@%$oldincludedir%g
  2144. s%@infodir@%$infodir%g
  2145. s%@mandir@%$mandir%g
  2146. s%@CC@%$CC%g
  2147. s%@CC_G_OPT@%$CC_G_OPT%g
  2148. s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
  2149. s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
  2150. s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
  2151. s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
  2152. s%@ECHO_LINK@%$ECHO_LINK%g
  2153. s%@EXTRA_LIBS@%$EXTRA_LIBS%g
  2154. s%@LD@%$LD%g
  2155. s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
  2156. s%@LD_MODEL@%$LD_MODEL%g
  2157. s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
  2158. s%@LIBTOOL@%$LIBTOOL%g
  2159. s%@LIB_NAME@%$LIB_NAME%g
  2160. s%@LIB_PREFIX@%$LIB_PREFIX%g
  2161. s%@LINK_TESTS@%$LINK_TESTS%g
  2162. s%@LINT@%$LINT%g
  2163. s%@LINT_OPTS@%$LINT_OPTS%g
  2164. s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
  2165. s%@MATH_LIB@%$MATH_LIB%g
  2166. s%@PROG_EXT@%$PROG_EXT%g
  2167. s%@TEST_ARGS@%$TEST_ARGS%g
  2168. s%@TEST_DEPS@%$TEST_DEPS%g
  2169. s%@cf_cv_abi_version@%$cf_cv_abi_version%g
  2170. s%@cf_cv_rel_version@%$cf_cv_rel_version%g
  2171. s%@CPP@%$CPP%g
  2172.  
  2173. CEOF
  2174. EOF
  2175.  
  2176. cat >> $CONFIG_STATUS <<\EOF
  2177.  
  2178. # Split the substitutions into bite-sized pieces for seds with
  2179. # small command number limits, like on Digital OSF/1 and HP-UX.
  2180. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2181. ac_file=1 # Number of current file.
  2182. ac_beg=1 # First line for current file.
  2183. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2184. ac_more_lines=:
  2185. ac_sed_cmds=""
  2186. while $ac_more_lines; do
  2187.   if test $ac_beg -gt 1; then
  2188.     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2189.   else
  2190.     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2191.   fi
  2192.   if test ! -s conftest.s$ac_file; then
  2193.     ac_more_lines=false
  2194.     rm -f conftest.s$ac_file
  2195.   else
  2196.     if test -z "$ac_sed_cmds"; then
  2197.       ac_sed_cmds="sed -f conftest.s$ac_file"
  2198.     else
  2199.       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2200.     fi
  2201.     ac_file=`expr $ac_file + 1`
  2202.     ac_beg=$ac_end
  2203.     ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2204.   fi
  2205. done
  2206. if test -z "$ac_sed_cmds"; then
  2207.   ac_sed_cmds=cat
  2208. fi
  2209. EOF
  2210.  
  2211. cat >> $CONFIG_STATUS <<EOF
  2212.  
  2213. CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  2214. EOF
  2215. cat >> $CONFIG_STATUS <<\EOF
  2216. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2217.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2218.   case "$ac_file" in
  2219.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2220.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2221.   *) ac_file_in="${ac_file}.in" ;;
  2222.   esac
  2223.  
  2224.   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2225.  
  2226.   # Remove last slash and all that follows it.  Not all systems have dirname.
  2227.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2228.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2229.     # The file is in a subdirectory.
  2230.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  2231.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2232.     # A "../" for each directory in $ac_dir_suffix.
  2233.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2234.   else
  2235.     ac_dir_suffix= ac_dots=
  2236.   fi
  2237.  
  2238.   case "$ac_given_srcdir" in
  2239.   .)  srcdir=.
  2240.       if test -z "$ac_dots"; then top_srcdir=.
  2241.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2242.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2243.   *) # Relative path.
  2244.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2245.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2246.   esac
  2247.  
  2248.  
  2249.   echo creating "$ac_file"
  2250.   rm -f "$ac_file"
  2251.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2252.   case "$ac_file" in
  2253.   *Makefile*) ac_comsub="1i\\
  2254. # $configure_input" ;;
  2255.   *) ac_comsub= ;;
  2256.   esac
  2257.  
  2258.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2259.   sed -e "$ac_comsub
  2260. s%@configure_input@%$configure_input%g
  2261. s%@srcdir@%$srcdir%g
  2262. s%@top_srcdir@%$top_srcdir%g
  2263. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  2264. fi; done
  2265. rm -f conftest.s*
  2266.  
  2267. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2268. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2269. #
  2270. # ac_d sets the value in "#define NAME VALUE" lines.
  2271. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  2272. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  2273. ac_dC='\3'
  2274. ac_dD='%g'
  2275. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2276. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2277. ac_uB='\([     ]\)%\1#\2define\3'
  2278. ac_uC=' '
  2279. ac_uD='\4%g'
  2280. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2281. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2282. ac_eB='$%\1#\2define\3'
  2283. ac_eC=' '
  2284. ac_eD='%g'
  2285.  
  2286. if test "${CONFIG_HEADERS+set}" != set; then
  2287. EOF
  2288. cat >> $CONFIG_STATUS <<EOF
  2289.   CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
  2290. EOF
  2291. cat >> $CONFIG_STATUS <<\EOF
  2292. fi
  2293. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2294.   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2295.   case "$ac_file" in
  2296.   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2297.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2298.   *) ac_file_in="${ac_file}.in" ;;
  2299.   esac
  2300.  
  2301.   echo creating $ac_file
  2302.  
  2303.   rm -f conftest.frag conftest.in conftest.out
  2304.   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2305.   cat $ac_file_inputs > conftest.in
  2306.  
  2307. EOF
  2308.  
  2309.  
  2310. # Transform confdefs.h into a list of #define's.  We won't use it as a sed
  2311. # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
  2312. # be either 'cat' or 'sort'.
  2313. sort confdefs.h >conftest.vals
  2314.  
  2315. # Break up conftest.vals because some shells have a limit on
  2316. # the size of here documents, and old seds have small limits too.
  2317.  
  2318. rm -f conftest.tail
  2319. echo '  rm -f conftest.frag' >> $CONFIG_STATUS
  2320. while :
  2321. do
  2322.   ac_lines=`grep -c . conftest.vals`
  2323.   # grep -c gives empty output for an empty file on some AIX systems.
  2324.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2325.   # Write chunks of a limited-size here document to conftest.frag.
  2326.   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
  2327.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2328.   echo 'CEOF' >> $CONFIG_STATUS
  2329.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2330.   rm -f conftest.vals
  2331.   mv conftest.tail conftest.vals
  2332. done
  2333. rm -f conftest.vals
  2334.  
  2335. # Run sed to substitute the contents of conftest.frag into conftest.in at the
  2336. # marker @DEFS@.
  2337. echo '  cat >> conftest.edit <<CEOF
  2338. /@DEFS@/r conftest.frag
  2339. /@DEFS@/d
  2340. CEOF
  2341. sed -f conftest.edit conftest.in > conftest.out
  2342. rm -f conftest.in
  2343. mv conftest.out conftest.in
  2344. rm -f conftest.edit conftest.frag
  2345. ' >> $CONFIG_STATUS
  2346.  
  2347.  
  2348. cat >> $CONFIG_STATUS <<\EOF
  2349.   rm -f conftest.frag conftest.h
  2350.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2351.   cat conftest.in >> conftest.h
  2352.   rm -f conftest.in
  2353.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2354.     echo "$ac_file is unchanged"
  2355.     rm -f conftest.h
  2356.   else
  2357.     # Remove last slash and all that follows it.  Not all systems have dirname.
  2358.       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2359.       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2360.       # The file is in a subdirectory.
  2361.       test ! -d "$ac_dir" && mkdir "$ac_dir"
  2362.     fi
  2363.     rm -f $ac_file
  2364.     mv conftest.h $ac_file
  2365.   fi
  2366. fi; done
  2367.  
  2368. EOF
  2369. cat >> $CONFIG_STATUS <<EOF
  2370. # Extra initialization commands, if any
  2371.  
  2372. EOF
  2373. cat >> $CONFIG_STATUS <<\EOF
  2374. # Extra commands, if any
  2375.  
  2376.     cat >>Makefile <<TEST_EOF
  2377.  
  2378. # These rules are generated so we do not rely on suffix rules, which do not
  2379. # work consistently for different make-programs (the '\$(MODEL)/' confuses
  2380. # some, and the '\$x' confuses others).
  2381. TEST_EOF
  2382. LIST=`make echo_tests`
  2383. LAST=`make echo_suffix`
  2384. for n in $LIST
  2385. do
  2386.     N=`echo $n | sed -e s/${LAST}\$//`
  2387.     cat >>Makefile <<TEST_EOF
  2388.  
  2389. \$(MODEL)/$N.o : $N.c \\
  2390.     test.priv.h \\
  2391.     ncurses_cfg.h
  2392.     @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
  2393. TEST_EOF
  2394. done
  2395.  
  2396. exit 0
  2397. EOF
  2398. chmod +x $CONFIG_STATUS
  2399. rm -fr confdefs* $ac_clean_files
  2400. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2401.  
  2402.